﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sandbox.Scene.Components
{
	public abstract class SceneObjectComponent
	{

		public EntitySceneObject SceneObject
		{
			get { return m_SceneObject; }
		}

		public void Detach()
		{
			if (SceneObject != null)
				SceneObject.DetachComponent(this);
		}

		public abstract void Display();

		public virtual void OnAttachedTo(EntitySceneObject sceneObj)
		{
			m_SceneObject = sceneObj;
		}

		public virtual void OnDetached()
		{
			m_SceneObject = null;
		}

		private EntitySceneObject m_SceneObject;

	}
}
